<div class="galleries form">
<?php echo $form->create('Gallery');?>
	<fieldset>
 		<legend><?php __('Editar Galeria');?></legend>
	<?php
		echo $form->input('id');
		echo $form->input('title');
		echo $form->input('descripcion');
	?>
	</fieldset>
<?php echo $form->end('Submit');?>
</div>
<div>
	<?php echo $form->create('Gallery',array('action'=>'agregar_imagen','type' => 'file'));?>
	<fieldset>
	 	<legend><?php __('Agregar imagenes');?></legend>
		<?php
			echo $form->input('id');
			echo $form->file('Image.Attachment');
		?>
		<?php echo $form->end('Agregar Imagen');?>
		
	</fieldset>
	<fieldset>
	 	<legend><?php __('Imagenes');?></legend>
		<?php foreach ($this->data['Image']['files'] as $image){?>
			<?php if(!empty($image)){?>
				<div style="float:left;">
				<?php 	echo $html->image($base.'img/attachments/Gallery/small/'.$image); ?>
				<?php echo $html->link(
											$html->image('imagenes/cross.png', array('title'=>'borrar')), 
											array('plugin'=>'images','controller' => 'images', 'action' => 'delete','gallery', $this->data['Gallery']['id'],$image),
											array('style'=>'float:left;'), 
											sprintf(__('Esta seguro que quiere eliminar la imagen %s? ', true), $image), false);?>
				</div>
			<?php }?>
		<?php }?>
	</fieldset>
	

</div>
